<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:include="~{common/header :: commonHead}">
    <title>商铺详情</title>
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5 th:text="${null == editable ? '添加商铺' : '商铺编辑'}"></h5>
                    <div class="ibox-tools">
                    </div>
                </div>

                <div class="ibox-content">
                    <form class="row form-body form-horizontal m-t" method="post" th:action="${null == editable ? '/store/add' : '/store/edit'}">
                        <input name="id" th:value="${editable?.id}" style="display: none">
                        <div class="col-md-12 droppable sortable ui-droppable ui-sortable">
                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">商铺名称：</label>
                                <div class="col-sm-6">
                                    <input type="text" name="storeName" class="form-control" th:value="${editable?.storeName }" placeholder="请输入商户名称">
                                </div>
                            </div>

                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">商铺编号：</label>
                                <div class="col-sm-6">
                                    <input type="text" name="storeNum" class="form-control" th:value="${editable?.storeNum }" placeholder="请输入商户编号">
                                </div>
                            </div>
                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">商铺业态：</label>
                                <div class="col-sm-6">
                                    <select class="form-control" name="storeStatus">
                                        <option th:selected="${editable?.storeStatus == 0}" value="0">待开业</option>
                                        <option th:selected="${editable?.storeStatus == 1}" value="1">正常营业</option>
                                        <option th:selected="${editable?.storeStatus == 2}" value="2">关门</option>
                                    </select>
                                </div>
                            </div>

                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">上传logo：</label>
                                <div class="col-sm-6">
                                    <div id="add_icons" class="add_icons">
                                        <div class="add_icon_pan">
                                            <input name="upload_pic"
                                                   id="upload_pic" type="file"
                                                   accept="image/*"
                                                   control_id="logo"
                                                   class="upload_pic_input">
                                            <img id="uploaded_pic" th:class="${editable?.logo != null ? '' : 'hide' }"
                                                 th:src="${editable?.logo != null ? editable.logo : ''}"/>
                                            <div th:class="'mark ' + ${editable?.logo != null ? '' : 'hide' }">
                                                <div class="close_icon_button"
                                                     control_id="logo"></div>
                                            </div>
                                            <label for="upload_pic"
                                                   th:class="'add_icon_button ' + ${editable?.logo != null ? 'hide' : ''}"></label>
                                        </div>
                                    </div>
                                    <label class="help-block">像素比例  宽 x 高 = 50 x 50</label>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-lg-2 col-md-4 col-sm-12 control-label" for="logo"></label>
                                <div class="col-lg-4 col-md-8">
                                    <input class="form-control" id="logo" name="logo" type="text" th:value="${editable?.logo}" style="display: none;">
                                </div>
                            </div>
                            <div th:if="${null != editable}" class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">创建时间：</label>
                                <div class="col-sm-6">
                                    <input type="text" name="createTime" class="form-control" th:value="${editable?.createTime}" disabled>
                                </div>
                            </div>
                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <div class="input-group clockpicker" data-autoclose="true">
                                    <input type="text" class="form-control" value="09:30">
                                    <span class="input-group-addon">
                                    <span class="fa fa-clock-o"></span>
                                </span>
                                </div>
                            </div>
                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">开业时间：</label>
                                <div class="col-sm-6">
                                    <input type="text" name="startTime" class="form-control" th:value="${editable?.startTime}" placeholder="请输入文本">
                                </div>
                            </div>
                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">闭店时间：</label>
                                <div class="col-sm-6">
                                    <input type="text" name="endTime" class="form-control" th:value="${editable?.endTime}" placeholder="请输入文本">
                                </div>
                            </div>
                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">地址：</label>
                                <div class="col-sm-6">
                                    <input type="text" name="address" class="form-control" th:value="${editable?.address }" placeholder="请输入文本">
                                </div>
                            </div>
                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">楼层：</label>
                                <div class="col-sm-6">
                                    <input type="text" name="storeFloor" class="form-control" th:value="${editable?.storeFloor}" placeholder="请输入文本">
                                </div>
                            </div>
                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">电话：</label>
                                <div class="col-sm-6">
                                    <input type="text" name="phone" class="form-control" th:value="${editable?.phone}" placeholder="请输入电话">
                                </div>
                            </div>

                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">简介：</label>
                                <div class="col-sm-6">
                                    <textarea style="height: 100px" name="description" class="form-control" th:text="${editable?.description}" placeholder="请输入文本">
                                    </textarea>
                                </div>
                            </div>

                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">星级：</label>
                                <div class="col-sm-6">
                                    <input id="input-id" style="display: none" type="number" class="rating" min=0 max=5 step=1 data-size="xs" th:value="${editable?.starLevel}" >
                                </div>
                            </div>

                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">是否热门：</label>
                                <div class="col-sm-6">
                                    <label class="radio-inline">
                                        <input type="radio" th:checked="${editable?.storeHot == 0}" value="0" name="storeHot">普通商户
                                    </label>
                                    <label class="radio-inline">
                                        <input type="radio" th:checked="${editable?.storeHot == 1}" value="1"  name="storeHot">热门商户
                                    </label>
                                </div>
                            </div>


                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">是否展示：</label>
                                <div class="col-sm-6">
                                    <label class="radio-inline">
                                        <input type="radio" th:checked="${editable?.statusShow == 0}" value="0" name="statusShow">是
                                    </label>
                                    <label class="radio-inline">
                                        <input type="radio" th:checked="${editable?.statusShow == 1}" value="1" name="statusShow">否
                                    </label>
                                </div>
                            </div>

                            <div class="hr-line-dashed"></div>

                            <div class="form-group draggable ui-draggable">
                                <div class="col-sm-12 col-sm-offset-3">
                                    <button class="btn btn-primary" type="submit">保存内容</button>
                                </div>
                            </div>

                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>